package org.example.mallchat.common.constant;

/**
 * @author: zzh
 * @date: 2024/12/20 11:58:24
 * @version: 1.0
 */
// Redis的key常量
public class RedisKey {
    // 基础key
    private static final String BASE_KEY = "mallchat:";

    /**
     * 用户token存放
     */
    public static final String USER_TOKEN_STRING = "userToken:uid_%d";

    /**
     * 生成key方法
     */
    public static String generateKey(String key, Object... args) {
        return BASE_KEY + String.format(key, args);
    }

}
